package org.zcl.controller;

import org.redisson.api.RMapCache;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;

/**
 * @author: ZCL
 * @since: 2021/10/14 9:46
 */
@RestController
@RequestMapping("/hello")
public class HelloController {

    @Autowired
    private RedissonClient redissonClient;

    @RequestMapping("/redis")
    public String testStarter() throws IOException {
        Config config = redissonClient.getConfig();
        return config.toJSON();
    }
}
